import axios from '../utils/http'
// 登录
export function crucibleFormingGet (params) {
  return axios({
    url: '/crucibleForming/get',
    method: 'get',
    params: params
  })
}
export function crucibleFormingDelete (_id, params) {
  return axios({
    url: '/crucibleForming/delete?_id=' + _id,
    method: 'delete',
    params: params
  })
}
export function crucibleFormingCreate (payload) {
  return axios({
    url: '/crucibleForming/create',
    method: 'post',
    data: payload
  })
}
export function crucibleFormingUpdate (payload) {
  return axios({
    url: '/crucibleForming/update',
    method: 'put',
    data: payload
  })
}
export function getCrucibleFormConditions (params) {
  return axios({
    url: '/crucibleForming/getCrucibleFormConditions',
    method: 'get',
    data: params
  })
}
// 坩埚一焙工单
export function crucibleFirstRoastGet (params) {
  return axios({
    url: 'crucibleFirstRoast/get',
    method: 'get',
    params: params
  })
}
export function crucibleFirstRoastCreate (payload) {
  return axios({
    url: 'crucibleFirstRoast/create',
    method: 'post',
    data: payload
  })
}
export function crucibleFirstRoastUpdate (payload) {
  return axios({
    url: 'crucibleFirstRoast/update',
    method: 'put',
    data: payload
  })
}
export function crucibleFirstRoastDelete (_id) {
  return axios({
    url: 'crucibleFirstRoast/delete?_id=' + _id,
    method: 'delete'
  })
}
// 坩埚一焙工单
export function crucibleFirstRoastOutHelpGet (params) {
  return axios({
    url: 'crucibleFirstRoastOutHelp/get',
    method: 'get',
    params: params
  })
}

export function crucibleFirstRoastOutHelpCreate (payload) {
  return axios({
    url: 'crucibleFirstRoastOutHelp/create',
    method: 'post',
    data: payload
  })
}
export function crucibleFirstRoastOutHelpUpdate (payload) {
  return axios({
    url: 'crucibleFirstRoastOutHelp/update',
    method: 'put',
    data: payload
  })
}
export function crucibleFirstRoastOutHelpDelete (_id) {
  return axios({
    url: 'crucibleFirstRoastOutHelp/delete?_id=' + _id,
    method: 'delete'
  })
}
// 坩埚机加工工单
export function crucibleMachiningGet (params) {
  return axios({
    url: 'crucibleMachining/get',
    method: 'get',
    params: params
  })
}

export function crucibleMachiningCreate (payload) {
  return axios({
    url: 'crucibleMachining/create',
    method: 'post',
    data: payload
  })
}
export function crucibleMachiningUpdate (payload) {
  return axios({
    url: 'crucibleMachining/update',
    method: 'put',
    data: payload
  })
}
export function crucibleMachiningDelete (_id) {
  return axios({
    url: 'crucibleMachining/delete?_id=' + _id,
    method: 'delete'
  })
}
// 坩埚plc获取表格分钟数据
export function crucibleDataGet (params) {
  return axios({
    url: '/crucibleData/getData',
    method: 'get',
    params: params
  })
}
// 坩埚plc获取表格10 30 60 分钟数据
export function crucibleDataGetAllData (params) {
  return axios({
    url: '/crucibleData/getHis',
    method: 'get',
    params: params
  })
}
// 一炉工单附件上传
export function oneFurnaceUpload(params) {
  return axios({
    url: '/roastReport/upload',
    method: 'post',
    data: params
  })
}
// 添加一炉工单
export function oneFurnaceCreate(params) {
  return axios({
    url: '/roastReport/create',
    method: 'post',
    data: params
  })
}
// 获取一炉工单
export function oneFurnaceGet(params) {
  return axios({
    url: '/roastReport/get',
    method: 'get',
    params: params
  })
}
// 编辑一炉工单
export function oneFurnaceUpdate(params) {
  return axios({
    url: '/roastReport/update',
    method: 'post',
    data: params
  })
}
// 删除一炉工单
export function oneFurnaceDelete(params) {
  return axios({
    url: '/roastReport/delete',
    method: 'delete',
    params: params
  })
}